<?php
namespace app\admin\validate;

use think\Validate;

class ShopValidate extends Validate
{
    protected $rule =   [
        'id'                   => 'require|number',
        'admin_id|店铺ID'       => 'require|number',
        'status|状态'           => 'require|number',
        'page|页数'             => 'require|number',
        'limit|条数'            => 'require|number',
        'nickname|门店名称'     => 'require|length:2,20',
        'username|账号'         => 'require|length:5,20',
        'money_gold|新人福利金'  => 'require',
        'point_radio|积分比例'   => 'require',
        'address|详细地址'       => 'require|length:2,200',
    ];
    
    protected $scene = [
        'show'         => ['id'],
        'list'         => ['page', 'limit'],
        'edit'         => ['id', 'nickname', 'username', 'money_gold', 'point_radio', 'address'],
        'edit_img'     => ['id', 'nickname', 'username', 'money_gold', 'point_radio', 'address', 'logo'],
    ];
}